package com.shrw.duke.bluetoothheartrate.entity;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.IntDef;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

/**
 * Created by rw-duke on 2017/11/6.
 */

public class RateEntity implements Parcelable {
    private String name;
    private String address;
    private String record;
    private int rssi;
    private StateEntity stateEntity;

    private String volt;
    private String rate;
    private String Lf_Times;//激活次数
    private String Nrf_Times;//2.4G发送次数
    private String AID_STR1_ActID;
    private String AID_STR1_Rssi;
    private String AID_STR2_ActID;
    private String AID_STR2_Rssi;
    private String AID_STR3_ActID;

    private String measoreTime;

    //    public RateEntity(String name, String address, String record, int rssi, String stateEntity, String rate) {
//        this.name = name;
//        this.address = address;
//        this.record = record;
//        this.rssi = rssi;
//        this.stateEntity = new StateEntity(stateEntity.toCharArray());
//        this.volt = volt;
//        this.rate = rate;
//    }
    public String getMeasoreTime() {
        return measoreTime;
    }

    public void setMeasoreTime(String measoreTime) {
        this.measoreTime = measoreTime;
    }

    public String getName() {
        return name;
    }

    public void setName(@Nullable String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(@Nullable String address) {
        this.address = address;
    }

    public String getRecord() {
        return record;
    }

    public void setRecord(@Nullable String record) {
        this.record = record;
    }

    public int getRssi() {
        return rssi;
    }

    public void setRssi(@Nullable int rssi) {
        this.rssi = rssi;
    }

    public StateEntity getStateEntity() {
        return stateEntity;
    }

    public void setStateEntity(StateEntity stateEntity) {
        this.stateEntity = stateEntity;
    }

    public String getVolt() {
        return volt;
    }

    public void setVolt(String volt) {
        this.volt = volt;
    }

    public String getRate() {
        return rate;
    }

    public void setRate(@NonNull String rate) {
        this.rate = rate;
    }

    public String getLf_Times() {
        return Lf_Times;
    }

    public void setLf_Times(String lf_Times) {
        Lf_Times = lf_Times;
    }

    public String getNrf_Times() {
        return Nrf_Times;
    }

    public void setNrf_Times(String nrf_Times) {
        Nrf_Times = nrf_Times;
    }

    public String getAID_STR1_ActID() {
        return AID_STR1_ActID;
    }

    public void setAID_STR1_ActID(String AID_STR1_ActID) {
        this.AID_STR1_ActID = AID_STR1_ActID;
    }

    public String getAID_STR1_Rssi() {
        return AID_STR1_Rssi;
    }

    public void setAID_STR1_Rssi(String AID_STR1_Rssi) {
        this.AID_STR1_Rssi = AID_STR1_Rssi;
    }

    public String getAID_STR2_ActID() {
        return AID_STR2_ActID;
    }

    public void setAID_STR2_ActID(String AID_STR2_ActID) {
        this.AID_STR2_ActID = AID_STR2_ActID;
    }

    public String getAID_STR2_Rssi() {
        return AID_STR2_Rssi;
    }

    public void setAID_STR2_Rssi(String AID_STR2_Rssi) {
        this.AID_STR2_Rssi = AID_STR2_Rssi;
    }

    public String getAID_STR3_ActID() {
        return AID_STR3_ActID;
    }

    public void setAID_STR3_ActID(String AID_STR3_ActID) {
        this.AID_STR3_ActID = AID_STR3_ActID;
    }


    public RateEntity() {
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeString(this.address);
        dest.writeString(this.record);
        dest.writeInt(this.rssi);
        dest.writeParcelable(this.stateEntity, flags);
        dest.writeString(this.volt);
        dest.writeString(this.rate);
        dest.writeString(this.Lf_Times);
        dest.writeString(this.Nrf_Times);
        dest.writeString(this.AID_STR1_ActID);
        dest.writeString(this.AID_STR1_Rssi);
        dest.writeString(this.AID_STR2_ActID);
        dest.writeString(this.AID_STR2_Rssi);
        dest.writeString(this.AID_STR3_ActID);
        dest.writeString(this.measoreTime);
    }

    protected RateEntity(Parcel in) {
        this.name = in.readString();
        this.address = in.readString();
        this.record = in.readString();
        this.rssi = in.readInt();
        this.stateEntity = in.readParcelable(StateEntity.class.getClassLoader());
        this.volt = in.readString();
        this.rate = in.readString();
        this.Lf_Times = in.readString();
        this.Nrf_Times = in.readString();
        this.AID_STR1_ActID = in.readString();
        this.AID_STR1_Rssi = in.readString();
        this.AID_STR2_ActID = in.readString();
        this.AID_STR2_Rssi = in.readString();
        this.AID_STR3_ActID = in.readString();
        this.measoreTime = in.readString();
    }

    public static final Creator<RateEntity> CREATOR = new Creator<RateEntity>() {
        @Override
        public RateEntity createFromParcel(Parcel source) {
            return new RateEntity(source);
        }

        @Override
        public RateEntity[] newArray(int size) {
            return new RateEntity[size];
        }
    };
}
